<?
global $db,$topdir;
$e = inc_incfile("wiki/global.php",$params);
skin_param("title","Meta-Data");
$link = $e["link"];
	
if(($oldid=$_REQUEST["oldid"]) != ($midid=$params["id"])) $check = 1;

if (count($_POST)) {
	$e = array("link"=>$link);
	foreach (array("name","title","summary","keywords","parent") as $k) {
		if (isset($_POST[$k])) $e[$k] = $_POST[$k];
		}
	_wiki_insert($e);
	header("Location: $link"); die;
	}

$e["changes"] = "";
inc_incfile("form3.php",array(
	"record"=>$e,
	"fields"=>array(	
		"name"=>array(
			"type"=>"default",
			"title"=>"Link Text",
			),
		"title"=>array(
			"type"=>"default",
			"title"=>"Title",
			),
		/*
		"summary"=>array(
			"title"=>"Summary",
			"type"=>"textarea",
			"rows"=>3,
			),
		"keywords"=>array(
			"type"=>"default",
			"title"=>"Keywords",
			),
		*/
		"parent"=>array(
			"type"=>"default",
			"title"=>"Parent Page",
			"size"=>30,
			"note"=>"leave blank for top level pages",
			),
		"changes"=>array(
			"type"=>"default",
			"title"=>"Changes",
			),
		),
	"actions"=>array(
		"Continue"=>"",
		),
	));
	
?>